package com.enation.app.javashop.core.client.fallback.statistics;

import com.enation.app.javashop.core.client.feignimpl.statistics.DisplayTimesClientFeignImpl;
import com.enation.app.javashop.core.handler.BaseFallbackFactory;
import com.enation.app.javashop.model.statistics.dos.GoodsPageView;
import com.enation.app.javashop.model.statistics.dos.ShopPageView;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * DisplayTimesClientFallback factory
 * @author kingapex
 * @version 1.0
 * @data 2022/5/28 15:57
 **/
@Component
public class DisplayTimesClientFallbackFactory extends BaseFallbackFactory<DisplayTimesClientFeignImpl> {
    @Override
    protected DisplayTimesClientFeignImpl fallback() {
        return new DisplayTimesClientFallback();
    }

    /**
     * DisplayTimesClientFallback
     * @author kingapex
     * @version 1.0
     * @data 2022/5/28 15:55
     **/
    public static class DisplayTimesClientFallback implements DisplayTimesClientFeignImpl {
        protected final Log logger = LogFactory.getLog(this.getClass());
        @Override
        public void countNow() {
            logger.error("countNow fallback");
        }

        @Override
        public void countShop(List<ShopPageView> list) {
            logger.error("countShop fallback");

        }

        @Override
        public void countGoods(List<GoodsPageView> list) {
            logger.error("countGoods fallback");

        }
    }
}
